<?php

declare(strict_types=1);

/**
 * @Author:     Frank
 * @contact     frank_hhm@163.com
 * @Date:       2023-02-07 09:53:41
 * @Last Modified time: 2023-02-22 16:40:43
 */
namespace app\common\enum\store\order;

use frank\base\BaseEnum;

/**
 * 枚举类
 * Class StatusEnum
 * @package app\common\enum\store\order
 */
class StatusEnum extends BaseEnum
{
    // 已完成
    const COMPLETED = 1;

    // 进行中
    const AFOOT = 2;

    // 已取消
    const CANCEL = 3;

    // 申请取消
    const PROCESS = 4;

    // 已失效
    const INVALID = 5;

    /**
     * 获取枚举数据
     * @return array
     */
    public static function data()
    {
        return [
            self::COMPLETED => [
                'name' => '已完成',
                'value' => self::COMPLETED,
                'color' => "green",
            ],
            self::AFOOT => [
                'name' => '进行中',
                'value' => self::AFOOT,
                'color' => "red",
            ],
            self::CANCEL => [
                'name' => '已取消',
                'value' => self::CANCEL,
                'color' => "grey",
            ],
            self::PROCESS => [
                'name' => '申请取消',
                'value' => self::PROCESS,
                'color' => "red",
            ],
            self::INVALID => [
                'name' => '已失效',
                'value' => self::INVALID,
                'color' => "grey",
            ],
        ];
    }
}
